package com.example.jpetstoreclient.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@TableName(value = "animals",autoResultMap = true)
@NoArgsConstructor
//@JsonInclude(JsonInclude.Include.NON_NULL)//设置空值不序列化
public class Animal {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String name;
    private int number;//库存
    private BigDecimal price;

    private String url;
    private String type;//种类
    private String good_specific;//具体种类


    public Animal(int id, String name, int number, BigDecimal price, String url, String type, String good_specific) {
        this.id = id;
        this.name = name;
        this.number = number;
        this.price = price;
        this.url = url;
        this.type = type;
        this.good_specific = good_specific;

    }

    public Animal(String name, int number, BigDecimal price, String url, String type, String good_specific) {
        this.name = name;
        this.number = number;
        this.price = price;
        this.url = url;
        this.type = type;
        this.good_specific = good_specific;
    }

    public Animal(String type){
        this.type = type;
    }

//    public Animal(){}
}
